import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import primaryBean2.PersonConfig;
import primaryBean2.PersonService;
import primaryBean2.impl.WorkerService;

/**
 * Created by ztt on 2017/9/21.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = PersonConfig.class)
public class PrimaryBeanTest2 {

    @Autowired
    private PersonService service;

    @Test
    public void run(){
        System.out.println(service);
    }
}
